Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Make Browser.{focus,blur}() synchronous #19078

Closed
wants to merge 1 commit into from

Conversation

martinpitt
Copy link
Member

Calling .focus() and .blur() is asynchronous. When followed by key presses (which is the common use case for foucssing), this sometimes leads to typing the key presses somewhere else than the intended focussed element. To fix that, wait until the active element actually switched to the desired one.


Should help with this failure, which produces this lovely mess. I'll test that in cockpit-project/cockpit-podman#1324

Calling .focus() and .blur() is asynchronous. When followed by key
presses (which is the common use case for foucssing), this sometimes
leads to typing the key presses somewhere else than the intended
focussed element. To fix that, wait until the active element actually
switched to the desired one.
@martinpitt martinpitt added the flake unstable test label Jul 6, 2023
@martinpitt martinpitt changed the title test: MakeBrowser.{focus,blur}() synchronous test: Make Browser.{focus,blur}() synchronous Jul 6, 2023
@martinpitt martinpitt marked this pull request as draft July 6, 2023 10:14
@martinpitt
Copy link
Member Author

Eww -- we call this with double-quotes, and more importantly with sizzle selectors, so that will need some more work.

@martinpitt
Copy link
Member Author

Also, it does not work in testPod yet either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flake unstable test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant